using System;
using System.Collections;
using System.Collections.Generic;
using Huirui.Cavan.Domain.Seedwork;

namespace Huirui.Cavan.Domain.MainBoundedContext.StockModule

{
	/// <summary>
	/// IndustryType object for NHibernate mapped table 'IndustryType'.
	/// </summary>
	[Serializable]
	public partial class StockType : Persistent
	{
		#region Member Variables

		protected string _name;
		#endregion
		
		#region Constructors
		public StockType() {}

        public StockType(string name, DateTime createDate, DateTime modifyDate, int editUser, byte[] version)
		{
            this._name = name;
            this._createDate = createDate;
            this._modifyDate = modifyDate;
            this._editUser = editUser;
            this._version = version;
		}
		
		#endregion
		
		#region Public Properties	
		public virtual string Name
		{
			get { return _name; }
			set 
			{
			  if (value != null && value.Length > 20)
			    throw new ArgumentOutOfRangeException("Name", "Name value, cannot contain more than 200 characters");
			  _name = value; 
			}
			
		}
 
		#endregion 
		
	}
	
}
